package module.common.provider;

import com.alibaba.android.arouter.facade.annotation.Interceptor;

import library.router.interceptor.AbstractLoginInterceptor;
import module.common.RouterConfig;
import module.common.share.SharedManager;

/**
 * @author Created by qiang.hou on 2019/2/19.
 * @version 1.0
 */
@Interceptor(priority = 1)
public class LoginInterceptor extends AbstractLoginInterceptor {

    @Override
    protected int loginInterceptExtra() {
        return RouterConfig.NEED_LOGIN_CHECK_EXTRA;
    }

    @Override
    protected String loginInterceptGroup() {
        return null;
    }

    @Override
    protected String loginPath() {
        return RouterConfig.login_LoginActivity;
    }

    @Override
    protected boolean isCurrentLogin() {
        return SharedManager.getInstance().getValue(SharedManager.KEY_IS_LOGIN, false);
    }
}
